package com.dolo.game.module
{
	import flash.errors.IllegalOperationError;

	public class MainSceneModule
	{
		public function MainSceneModule()
		{
			
		}
		public function onAdd():void
		{
			if( !_module )
			{
				_module = this.creatMainSceneModule();
				_module.onAdd();
			}
		}
		public function onRemove():void
		{
			if( !_module )
			{
				_module.onRemove();
				_module = null;
			}
		}
		protected function creatMainSceneModule():IModule
		{
			throw new IllegalOperationError("This is a Abstract method,please overridden it! ");
			return null;
		}
		
		private var _module:IModule;
	}
}